<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<include file="Public:base" />
<script type="text/javascript">
$(document).ready(function() {

	
	$("#adminform").validate({
		
		errorPlacement: function (error, element) {
            error.appendTo(element.parent().find('label'));
            element.parent().addClass("has-error");
        },
        //获取焦点时不验证 
        focusInvalid: false,   
        onkeyup: false ,
		//debug:true,
        
	    rules: {
	        'username': {
	            required: true
	        },
	        'email': {
	            required: true,
	            email:true
	        },
	        'password': {
	            required: true,
	            rangelength:[6,15]
	        }
	    },
	    messages: {
	        'username': {
	            required: "请输入用户名 "
	        },
	        'email': {
	            required: "请输入邮箱",
	            email:"邮箱格式错误"
	        },
	        'password': {
	            required: "请输入用户密码",
	            rangelength:"密码长度为 6-15位"
	        }
	    }
	});
});

</script>
</head>
<body>
<include file="Public:header" />
<div class="home-index">
		<div class="container">
	    <div class="row">
	      <ol class="breadcrumb">
	        <li>首页</li>
	        <li><a class='' href="__URL__/index">管理员管理</a></li>
	        <li class="active">添加管理员</li>
	      </ol>

		<div class="comm-box">
			<form  id="adminform" role="form" method="post" action="__URL__/create">

				<div class="form-group">
					<label >用户名:</label>
					<input type="text" name="username" class="form-control" placeholder="请输入用户名"></div>
				<div class="form-group">
					<label >邮箱:</label>
					<input type="text" name="email" class="form-control" placeholder="请输入邮箱"></div>
				
				<div class="form-group">
					<label>密码:</label>
					<input type="password" name="password" class="form-control" placeholder="请输入密码"></div>
				<button type="submit" class="btn btn-primary">提交</button>
			</form>
		</div>
		</div>
	</div>
</div>
</body>
</html>